{Scott's 2016-05-02 150MeV lattice + Holger's 2016-05-04 (or "160308a"?) combined fieldmap, or separate fieldmaps with Scott's adjustments.  This was agreed at the end of the May 5th meeting at BNL.}

#h    = +1.9610000439244760e-01;
#R=1.0/h;

#lqf  = +1.3300000000000001e-01;
#lqd  = +1.2200000000000000e-01;
#lfd  = +7.0000000000000007e-02;
#ldf  = +1.2000000000000000e-01;

#thqf=2*asin(0.5*lqf/R);
#thqd=2*asin(0.5*lqd/R);
#thfd=2*asin(0.5*lfd/R);
#thdf=2*asin(0.5*ldf/R);

{Drift Length Angle}
DF #R*thdf# #thdf*-1#
QF #R*thqf# #thqf*-1#
FD #R*thfd# #thfd*-1#
QD #R*thqd# #thqd*-1#
HDF #DF.Length/2# #DF.Angle/2#
HFD #FD.Length/2# #FD.Angle/2#
HDFS #HDF.Length#
QFS #QF.Length#
HFDS #HFD.Length#
QDS #QD.Length#

#scalboth = 1;
#dispboth = 0;
#scalF = +9.956754292475665e-01;
#scalD = +9.956754292475665e-01;
#dispF = +3.589333429517285e-04;
#dispD = -4.122256529507217e-04;

{TrilinearFieldMap File Strength Xrel MirrorY=1}
FMboth Cbeta\Iron_2016-05-04\160308a-38-48_5deg150MeVSepQdOnQfOn_polar.txt #scalboth*-1# #dispboth-R#
FMF Cbeta\Iron_2016-05-04\160308a-38-48_5deg150MeVSepQfOn_polar.txt #scalF*-1# #dispF-R#
FMD Cbeta\Iron_2016-05-04\160308a-38-48_5deg150MeVSepQdOn_polar.txt #scalD*-1# #dispD-R#

CellFM: HDF,QF,HFD,FMboth,HFD,QD,HDF;
CellFMsep: HDF,QF,HFD,FMF,FMD,HFD,QD,HDF;

#// Straight cell stuff removed (see Iron_2016-04-13) until I get separate maps

#Emin = +4.2000000000000000e+07;
#Emax = +1.5000000000000000e+08;
#n    = 4;

#EmasseV=510998.928;
{MatchScan Estart Egoal Estep Species=Electron AllowUnstable=1}
Match #Emax-EmasseV#eV #Emin-EmasseV#eV #(Emax-Emin)/(n-1)#eV
MatchFine #Match.Estart# #Match.Egoal# 1MeV
MatchSep #Match.Estart# #Match.Egoal# #Match.Estep#

{Match-Aperture} 
MatchEnd

CellFM,Match,CellFM,MatchEnd,CellFM,
CellFMsep,MatchSep,CellFMSep,MatchEnd,CellFMSep;
#//CellFM,Match,MatchFine,CellFM,MatchEnd,CellFM,
#//CellFM,Particles,10*CellFM,MatchEnd,CellFM;
#//4*CellFM;